/*
 * @Author: 噜噜雯雯 2199987619@qq.com
 * @Date: 2025-06-09 09:49:40
 * @LastEditors: 噜噜雯雯 2199987619@qq.com
 * @LastEditTime: 2025-09-18 16:28:40
 * @FilePath: \linePatrol\vue-element-plus-admin\src\store\modules\plangroup.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineStore } from 'pinia'
import { store } from '../index'
import { PatrolInfoDetail } from '@/api/linePatrol/type'
import PatrolInfoApi from '@/api/linePatrol'

export const useTrackPlayStore = defineStore('trackplay', {
  state: () => {
    return {
      TrackPlayList: [] as unknown as PatrolInfoDetail
    }
  },
  getters: {
    getTrackPlayList(): PatrolInfoDetail {
      return this.TrackPlayList
    }
  },
  actions: {
    async setTrackPlayList(uuid: string | undefined) {
      this.TrackPlayList = await PatrolInfoApi.PatrolInfoDetail(uuid)
    }
  },
  persist: true
})

export const useLockStoreWithOut = () => {
  return useTrackPlayStore(store)
}
